/**
 * Author: Lily Jiang
 * Create Time: 2019/9/3
 * Description:
 */

import {handleActions} from 'redux-actions';

export const app = handleActions({
    //  一次更新多个信息
    updateAppSetting: (state, action) => ({
        ...state,
        ...action.payload
    }),
    //  更新用户信息
    updateUserInfo: (state, action) => ({
        ...state,
        user: action.payload
    })
}, {
    user: null,
    isLogin: false,
    appLoading: false,      //  全局loading
    themeType: 'day',       //  主题：night夜间模式 day日间模式
});
